package com.example.demo.service.impl;

import com.example.demo.mapper.RecruitInfoMapper;
import com.example.demo.mapper.UserMapper;
import com.example.demo.pojo.*;
import com.example.demo.service.RecruitInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
@Service
public class RecruitInfoImpl implements RecruitInfoService {
    @Autowired
    private RecruitInfoMapper recruitInfoMapper;//自动创建对象,连接起来
    @Override
    public List<RecruitInfo> selectRecruitInfo() {
        List<RecruitInfo> recruitInfoList = recruitInfoMapper.selectRecruitInfo();

        return recruitInfoList;
    }
//保存简历信息
    @Override
    public void save(RecruitInfo recruitInfo) {
        recruitInfoMapper.save(recruitInfo);
    }

    @Override
    public List<RecruitInfo> getByAccount(String account) {
        List<RecruitInfo> recruitInfoList = recruitInfoMapper.getByAccount(account);
        return recruitInfoList;

    }

    @Override
    public void update(RecruitInfo recruitInfo) {
        recruitInfoMapper.update(recruitInfo);
    }

    @Override
    public void yaoQing(YaoQing yaoQing) {
        recruitInfoMapper.yaoQing(yaoQing);
    }

    @Override
    public List<Company_Student> getAccountByAccountCm(String accountCm) {
        return recruitInfoMapper.getAccountByAccountCm(accountCm);
    }

    @Override
    public void updateCompany_Student(Company_Student companyStudent) {
        recruitInfoMapper.updateCompany_Student(companyStudent);
    }

    @Override
    public void recruitUpdate(String accountCm) {
        recruitInfoMapper.recruitUpdate(accountCm);
    }
}
